package com.sgj.springcloud.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author 沈国纪
 * @date 2021/5/4 12:04
 */
@AllArgsConstructor
public enum ResEnum {

	SUCCESS_INSERT(200, "插入数据库成功"),
	FAIL_INSERT(444, "插入数据库失败"),
	SUCCESS_SEARCH(200, "查询数据库成功"),
	FAIL_SEARCH(444, "没有对应ID记录"),
	SUCCESS_FIND_NAME(200, "按资源名称限流测试 OK"),
	SUCCESS_FIND_URL(200, "按url限流测试 OK"),
	SUCCESS_FIND_CUSTOM(200, "按客户自定义"),
	SUCCESS_FIND_CUSTOM2(4444, "按客户自定义,global"),
	HANDLER_FALLBACK(444, "兜底异常 handlerFallback， exception 内容"),
	HANDLER_BLOCKHANDLER(445, "blockHandler-sentinel限流，无此流水：blockException  "),
	SERVICE_DEGRADATION(444, "服务降级返回， ---PaymentServiceImpl"),
	FAIL_SEARCH2(444, "操作失败");

	/**
	 * 状态码
	 */
	@Getter
	private Integer code;

	/**
	 * 返回信息
	 */
	@Getter
	private String message;
}
